<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PU2CLR Si4735 Arduino Library: Generic SI473X Command and Property methods</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="logo_si4735.png"/></td>
  <td id="projectalign">
   <div id="projectname">PU2CLR Si4735 Arduino Library<span id="projectnumber">&#160;2.1.4</span>
   </div>
   <div id="projectbrief">Arduino Library for Si47XX Devices - By Ricardo Lima Caratti</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group10.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Generic SI473X Command and Property methods</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga27549ef05fa62f60e4ac205c16b8f764"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#ga27549ef05fa62f60e4ac205c16b8f764">SI4735::setProperty</a> (uint16_t propertyNumber, uint16_t param)</td></tr>
<tr class="memdesc:ga27549ef05fa62f60e4ac205c16b8f764"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a given SI47XX device property.  <br /></td></tr>
<tr class="separator:ga27549ef05fa62f60e4ac205c16b8f764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d65660ec2b60d7486165ed8a7a92015"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#ga4d65660ec2b60d7486165ed8a7a92015">SI4735::sendProperty</a> (uint16_t propertyNumber, uint16_t param)</td></tr>
<tr class="memdesc:ga4d65660ec2b60d7486165ed8a7a92015"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends (sets) property to the SI47XX.  <br /></td></tr>
<tr class="separator:ga4d65660ec2b60d7486165ed8a7a92015"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d2342264b36bd524ccbaf898e4d219b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#ga3d2342264b36bd524ccbaf898e4d219b">SI4735::sendCommand</a> (uint8_t cmd, int parameter_size, const uint8_t *parameter)</td></tr>
<tr class="memdesc:ga3d2342264b36bd524ccbaf898e4d219b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a given command to the SI47XX devices.  <br /></td></tr>
<tr class="separator:ga3d2342264b36bd524ccbaf898e4d219b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab4c50abd500f55427a4d1d2273b45e3a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#gab4c50abd500f55427a4d1d2273b45e3a">SI4735::getCommandResponse</a> (int num_of_bytes, uint8_t *response)</td></tr>
<tr class="memdesc:gab4c50abd500f55427a4d1d2273b45e3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns with the command response.  <br /></td></tr>
<tr class="separator:gab4c50abd500f55427a4d1d2273b45e3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0ce36e251cbd826d4dee7687c1bc31a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group01.html#unionsi47x__status">si47x_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#gaf0ce36e251cbd826d4dee7687c1bc31a">SI4735::getStatusResponse</a> ()</td></tr>
<tr class="memdesc:gaf0ce36e251cbd826d4dee7687c1bc31a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the first byte response.  <br /></td></tr>
<tr class="separator:gaf0ce36e251cbd826d4dee7687c1bc31a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace60b9db8033c689247dc1370be367b6"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group10.html#gace60b9db8033c689247dc1370be367b6">SI4735::getProperty</a> (uint16_t propertyValue)</td></tr>
<tr class="memdesc:gace60b9db8033c689247dc1370be367b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a given property from the SI47XX.  <br /></td></tr>
<tr class="separator:gace60b9db8033c689247dc1370be367b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A set of functions used to support other functions </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga27549ef05fa62f60e4ac205c16b8f764" name="ga27549ef05fa62f60e4ac205c16b8f764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27549ef05fa62f60e4ac205c16b8f764">&#9670;&#160;</a></span>setProperty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setProperty </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>propertyNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>param</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets a given SI47XX device property. </p>
<p>Sets the Si47XX device with a given attribute.</p>
<p>You might need to use the bit operations or some bit field structure to set right the values.</p>
<p>Used this function instead of the sendProperty.</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 55, 69, 124 and 134. </dd>
<dd>
<a class="el" href="group__group10.html#gace60b9db8033c689247dc1370be367b6" title="Gets a given property from the SI47XX.">getProperty</a>, <a class="el" href="group__group10.html#ga4d65660ec2b60d7486165ed8a7a92015" title="Sends (sets) property to the SI47XX.">sendProperty</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">propertyNumber</td><td></td></tr>
    <tr><td class="paramname">param</td><td>pamameter value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga4d65660ec2b60d7486165ed8a7a92015" name="ga4d65660ec2b60d7486165ed8a7a92015"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d65660ec2b60d7486165ed8a7a92015">&#9670;&#160;</a></span>sendProperty()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::sendProperty </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>propertyNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>parameter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sends (sets) property to the SI47XX. </p>
<p>This method is used for others to send generic properties and params to SI47XX</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 68, 124 and 133. </dd>
<dd>
<a class="el" href="group__group10.html#ga27549ef05fa62f60e4ac205c16b8f764" title="Sets a given SI47XX device property.">setProperty</a>, <a class="el" href="group__group10.html#ga3d2342264b36bd524ccbaf898e4d219b" title="Sends a given command to the SI47XX devices.">sendCommand</a>, <a class="el" href="group__group10.html#gace60b9db8033c689247dc1370be367b6" title="Gets a given property from the SI47XX.">getProperty</a>, <a class="el" href="group__group10.html#gab4c50abd500f55427a4d1d2273b45e3a" title="Returns with the command response.">getCommandResponse</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">propertyNumber</td><td>property number (example: RX_VOLUME) </td></tr>
    <tr><td class="paramname">parameter</td><td>property value that will be seted </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

</div>
</div>
<a id="ga3d2342264b36bd524ccbaf898e4d219b" name="ga3d2342264b36bd524ccbaf898e4d219b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d2342264b36bd524ccbaf898e4d219b">&#9670;&#160;</a></span>sendCommand()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::sendCommand </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>parameter_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>parameter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a given command to the SI47XX devices. </p>
<p>This function can be useful when you want to execute a SI47XX device command and it was not implemented by this library.</p>
<p>In this case you have to check the AN332-Si47XX PROGRAMMING GUIDE to know how the command works.</p>
<p>Also, you need to work with bit operators to compose the parameters of the command [ &amp;(and), ˆ(xor), |(or) etc ].</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group10.html#gab4c50abd500f55427a4d1d2273b45e3a" title="Returns with the command response.">getCommandResponse</a>, <a class="el" href="group__group10.html#ga27549ef05fa62f60e4ac205c16b8f764" title="Sets a given SI47XX device property.">setProperty</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cmd</td><td>command number (see AN332-Si47XX PROGRAMMING GUIDE) </td></tr>
    <tr><td class="paramname">parameter_size</td><td>Parameter size in bytes. Tell the number of argument used by the command. </td></tr>
    <tr><td class="paramname">parameter</td><td>unsigned byte array with the arguments of the command </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

</div>
</div>
<a id="gab4c50abd500f55427a4d1d2273b45e3a" name="gab4c50abd500f55427a4d1d2273b45e3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab4c50abd500f55427a4d1d2273b45e3a">&#9670;&#160;</a></span>getCommandResponse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::getCommandResponse </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>response_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>response</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns with the command response. </p>
<p>After a command is executed by the device, you can get the result (response) of the command by calling this method.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group10.html#ga3d2342264b36bd524ccbaf898e4d219b" title="Sends a given command to the SI47XX devices.">sendCommand</a>, <a class="el" href="group__group10.html#ga27549ef05fa62f60e4ac205c16b8f764" title="Sets a given SI47XX device property.">setProperty</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">response_size</td><td>num of bytes returned by the command. </td></tr>
    <tr><td class="paramname">response</td><td>byte array where the response will be stored. </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

</div>
</div>
<a id="gaf0ce36e251cbd826d4dee7687c1bc31a" name="gaf0ce36e251cbd826d4dee7687c1bc31a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf0ce36e251cbd826d4dee7687c1bc31a">&#9670;&#160;</a></span>getStatusResponse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group01.html#unionsi47x__status">si47x_status</a> SI4735::getStatusResponse </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the first byte response. </p>
<p>In this context status is the first response byte for any SI47XX command. See <a class="el" href="group__group01.html#unionsi47x__status" title="Status response data representation.">si47x_status</a> structure.</p>
<p>This function can be useful to check, for example, the success or failure of a command.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group01.html#unionsi47x__status" title="Status response data representation.">si47x_status</a></dd></dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group01.html#unionsi47x__status" title="Status response data representation.">si47x_status</a> </dd></dl>

</div>
</div>
<a id="gace60b9db8033c689247dc1370be367b6" name="gace60b9db8033c689247dc1370be367b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gace60b9db8033c689247dc1370be367b6">&#9670;&#160;</a></span>getProperty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t SI4735::getProperty </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>propertyNumber</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets a given property from the SI47XX. </p>
<p>This method is used to get a given property from SI47XX</p>
<p>You might need to extract set of bits information from the returned value to know the real value</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 55, 69, 124 and 134. </dd>
<dd>
<a class="el" href="group__group10.html#ga4d65660ec2b60d7486165ed8a7a92015" title="Sends (sets) property to the SI47XX.">sendProperty</a>, <a class="el" href="group__group10.html#ga27549ef05fa62f60e4ac205c16b8f764" title="Sets a given SI47XX device property.">setProperty</a>, <a class="el" href="group__group10.html#ga3d2342264b36bd524ccbaf898e4d219b" title="Sends a given command to the SI47XX devices.">sendCommand</a>, <a class="el" href="group__group10.html#gab4c50abd500f55427a4d1d2273b45e3a" title="Returns with the command response.">getCommandResponse</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">propertyNumber</td><td>property number (example: RX_VOLUME)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>property value (the content of the property) </dd></dl>

<p class="reference">References <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
